package com.tebiecloud.store.server.service;

import com.tebiecloud.store.client.model.entity.StoreStaffWallet;
import com.tebiecloud.common.mybatis.base.service.IBaseService;
import com.tebiecloud.store.client.model.vo.DeductAmountVo;
import com.tebiecloud.store.client.model.vo.PlusAmountVo;

import java.util.Map;

/**
 *  服务类
 * @author tebie
 * @date 2019-09-15
 */
public interface StoreStaffWalletService extends IBaseService<StoreStaffWallet> {


    /**
     * 扣员工钱包金额
     * @param amount 扣钱总金额，单位分
     * @param maxCoin 乖乖币抵扣上限
     * @return
     */
    DeductAmountVo updateDeductAmount(Long storeStaffId, int amount, int maxCoin);

    /**
     * 添加员工钱包
     * @param balance 增加的余额，单位分
     * @param coin 增加的乖乖币
     * @return
     */
    PlusAmountVo updatePlusAmount(Long storeStaffId, int balance, int coin);

}
